<!DOCTYPE html >
<html>
<head>
    <link rel="stylesheet" href="demos.css" type="text/css" media="screen" />
    
    <script src="../libraries/RGraph.common.core.js" ></script>
    <script src="../libraries/RGraph.common.dynamic.js" ></script>
    <script src="../libraries/RGraph.common.tooltips.js" ></script>
    <script src="../libraries/RGraph.common.effects.js" ></script>
    <script src="../libraries/RGraph.line.js" ></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <!--[if lt IE 9]><script src="../excanvas/excanvas.js"></script><![endif]-->
    
    <title>The front page line chart</title>
    
    <meta name="robots" content="noindex,nofollow" />
    <meta name="description" content="The front page line chart" />
     
</head>
<body>

    <h1>The line chart from the front page</h1>

    <canvas id="cvs" width="400" height="200">[No canvas support]</canvas>
    
    <script>
        $(document).ready(function ()
        {
            var data1 = [4,6,12,16,8,4,2,8,18,16,14,16];
            var data2 = [2,4,8,4,2,6,6,12,8,10,6,8];

            var myLine = new RGraph.Line({
                id: 'cvs',
                data: [data1, data2],
                options: {
                    labels: ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
                    tickmarks: null,
                    gutter: {
                        left: 40,
                        right: 15,
                        bottom: 20
                    },
                    colors: ['red', 'black'],
                    units: {
                        post: '%'
                    },
                    linewidth: 5,
                    hmargin: 15,
                    text: {
                        color: '#333',
                        font: 'Arial'
                    },
                    background: {
                        grid: {
                            autofit: {
                                numvlines: 11
                            }
                        }
                    },
                    shadow: {
                        color: 'rgba(20,20,20,0.3)',
                        blur: 10,
                        offsetx: 0,
                        offsety: 0,
                        blur: 10
                    },
                    background: {
                        grid: {
                            vlines: false,
                            border: true
                        }
                    },
                    noxaxis: true,
                    title: 'An example Line chart',
                    axis: {
                        color: '#666'
                    },
                    text: {
                        color: '#666'
                    },
                    spline: true
                }
            }).draw()

            /**
            * Use the Trace animation to show the chart
            */
            if (RGraph.ISOLD) {
                // IE7/8 don't support shadow blur, so set custom shadow properties
                myLine.set({
                    shadow: {
                        offsetx: 3,
                        offsety: 3,
                        color: '#aaa'
                    }
                })
            } else {
                myLine.set({
                    tooltips: [
                               '<b>January</b><br />Started off the year quite averagely',
                               '<b>February</b><br />Better than January, rising quite nicely',
                               '<b>March</b><br />March was quite a spike',
                               '<b>April</b><br />Rising very impressively',
                               '<b>May</b><br />Dropping after the last two month spike',
                               '<b>June</b><br />Still dropping',
                               '<b>July</b><br />The fall is beginning to subside, but still dropping',
                               '<b>August</b><br />A good rise after the fall',
                               '<b>September</b><br />A very good peak',
                               '<b>October</b><br />The peak is now subsiding',
                               '<b>November</b><br />Still subsiding',
                               '<b>December</b><br />Rising again after the last fall',
    
    
                               '<b>January</b><br />Started off the year quite averagely as with Robert',
                               '<b>February</b><br />Rising as with Robert',
                               '<b>March</b><br />Not as good as Robert, but OK',
                               '<b>April</b><br />Dropping after the peak',
                               '<b>May</b><br />The low point as with last year',
                               '<b>June</b><br />Rising higher than Robert',
                               '<b>July</b><br />Consistent with last month',
                               '<b>August</b><br />A nice high point',
                               '<b>September</b><br />A low point',
                               '<b>October</b><br />A nice rise',
                               '<b>November</b><br />Falling for fall...',
                               '<b>December</b><br />Rising again for Christmas'
                              ]
                    })
                    .trace({'duration': 1000})
            }
        })
    </script>

    <p>
        <a href="./">&laquo; Back</a>
    </p>

</body>
</html>